Product: | ISaGRAF 4.0x |
Date: | 29-January-2001 |
File: | Real to String.htm |
Subject: | How to convert a Real to a String |
Keywords: | String - Real - conversion |
____________________________________________________________________
The ANY_TO_STRING conversion does not work with inputs of type REAL.
To work-around that you can
develop a C function and add it to the virtual machine if your system supports this conversion
or
Use the following IEC function.
Parameters are as follows:
Name |
Type | Direction |
RealValue |
REAL | Input |
StringToReal |
STRING(255) | Output |
StringToReal := any_to_string(any_to_dint(RealValue
*100000.0)/100000) + '.' +
any_to_string(mod(any_to_dint(abs(RealValue *100000.0)),
100000));
____________________________________________________________________
Copyright © 1999-2009 ICS Triplex ISaGRAF Inc. All rights reserved.